{extend name="public/base" /}

{block name="title"}<title>{if condition="$data"}{$Think.lang.edit}{else /}{$Think.lang.create}{/if}</title>{/block}

{block name="pjax_container"}
<div class="hry-content-wrapper">
<section class="content-header">
    <ol class="breadcrumb">
        <li>项目方管理</li>
        <li class="active">项目方信息</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#tab1" data-toggle="tab">{$Think.lang.base_param}</a></li>
                    <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm" style="padding:10px 2px;"><i class="fa fa-list"></i> {$Think.lang.back}</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane active" id="tab1">
                        <form class="form-horizontal" method="POST" action="" onsubmit="return false" >
                            <input type="hidden" name="id" value="{$data.id}" />
                            <input type="hidden" name="actions" value="message" />
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.companyname}</label>
                                <div class="col-sm-7"><input class="form-control" value="{$data.companyname}" name="companyname" placeholder="{$Think.lang.companyname}"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">（W:80 H:80）{$Think.lang.comlogo}</label>
                                <div class="col-sm-7">
                                    <div class="input-group">
                                        <input class="form-control" name="comlogo" value="{$data.comlogo}" placeholder="{$Think.lang.comlogo}" >
                                        <span class="input-group-btn">
                                            <a href="{$data.team_logo|default='/static/global/face/no-image.png'}" target="_blank" >
                                                <img src="{$data.team_logo|default='/static/global/face/no-image.png'}" style="height:34px; width:68px;" />
                                            </a>
                                            <button class="btn btn-success btn-flat up-btn" type="button" data-url="{:url('Uploads/upload')}?dir=project">
                                                <i class="fa fa-cloud-upload"> {$Think.lang.Upload}</i>
                                            </button>
                                        </span>                                        
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.team_message}</label>
                                <div class="col-sm-7"><textarea class="form-control" name="team_message" placeholder="{$Think.lang.team_message}">{$data.team_message}</textarea></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.comurl}</label>
                                <div class="col-sm-7"><input class="form-control" name="comurl" value="{$data.comurl}" placeholder="{$Think.lang.comurl}"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.file}</label>
                                <div class="col-sm-7">
                                    <div class="input-group">
                                        <input class="form-control" name="file" value="{$data.file}" placeholder="{$Think.lang.file}" >
                                        <span class="input-group-btn">
                                            <a href="{$data.team_document|default='/static/global/face/no-image.png'}" target="_blank" >
                                                <img src="{$data.team_document|default='/static/global/face/no-image.png'}" style="height:34px; width:68px;" />
                                            </a>
                                            <button class="btn btn-success btn-flat up-btn" type="button" data-url="{:url('Uploads/upload')}?dir=project">
                                                <i class="fa fa-cloud-upload"> {$Think.lang.Upload}</i>
                                            </button>
                                        </span>                                        
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.status}</label>
                                <div class="col-sm-7">
                                    <select class="form-control select2" name="status" style="width:100%;">
                                        <option value="1" {if condition="$data.status eq '1'"}selected="selected"{/if} >{$Think.lang.status1}</option>
                                        <option value="0" {if condition="$data.status eq '0'"}selected="selected"{/if} >{$Think.lang.status0}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.username}</label>
                                <div class="col-sm-7"><input class="form-control" name="username" value="{$data.username}" placeholder="{$Think.lang.username}"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.mobile}</label>
                                <div class="col-sm-7"><input class="form-control" name="mobile" value="{$data.mobile}" placeholder="{$Think.lang.mobile}"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.legal_person_number}</label>
                                <div class="col-sm-7"><input class="form-control" name="legal_person_number" value="{$data.legal_person_number}" placeholder="{$Think.lang.legal_person_number}"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.opening_bank}</label>
                                <div class="col-sm-7"><input class="form-control" name="opening_bank" value="{$data.opening_bank}" placeholder="{$Think.lang.opening_bank}"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.company_card}</label>
                                <div class="col-sm-7"><input class="form-control" name="company_card" value="{$data.company_card}" placeholder="{$Think.lang.company_card}"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.company_number}</label>
                                <div class="col-sm-7"><input class="form-control" name="card" value="{$data.card}" placeholder="{$Think.lang.company_number}"></div>
                            </div>
                            <div class="form-group hide">
                                <label class="col-sm-2 control-label">{$Think.lang.create_time}</label>
                                <div class="col-sm-7"><input class="form-control" disabled="disabled" value="{$data.create_time}" placeholder="{$Think.lang.create_time}"></div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-2"></div>
                                <div class="col-sm-7">
                                    <div class="btn-group pull-right">
                                        <button type="submit" class="btn btn-info pull-right submits" data-loading-text="&lt;i class='fa fa-spinner fa-spin '&gt;&lt;/i&gt; {$Think.lang.submit}">{$Think.lang.submit}</button>
                                    </div>
                                    <div class="btn-group pull-left">
                                        <button type="reset" class="btn btn-warning">{$Think.lang.reset}</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                   
                </div>
            </div>
        </div>
    </div>
</section>
</div>
<script type="text/javascript">
var KDEDT_DELETE_URL = '{:url("Uploads/delete")}';   //【删除地址】如果有使用到KindEditor编辑器的文件空间删除功能，必须添加该删除地址全局变量

$(function(){
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
    });
    
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $(".select2").select2({language:"zh-CN"});
    
    $('.timepicker').datetimepicker({
        format: 'YYYY-MM-DD',   //YYYY-MM-DD HH:mm:ss
        locale: moment.locale('zh-cn')
    });
    
    KindEditor.create('textarea[name="info"]',{
        width : '100%',   //宽度
        height : '320px',   //高度
        resizeType : '0',   //禁止拖动
        allowFileManager : true,   //允许对上传图片进行管理
        uploadJson : '{:url("Uploads/upload")}',   //文件上传地址
        fileManagerJson : '{:url("Uploads/manager")}',   //文件管理地址
        urlType : 'domain',   //带域名的路径
        formatUploadUrl: true,   //自动格式化上传后的URL
        autoHeightMode: false,   //开启自动高度模式
        afterBlur: function () { this.sync(); }   //同步编辑器数据
    });
    
   
    
    
    {if condition=" $rest_login == 1 "}
    restlogin('{$rest_login_info}');   //登录超时
    {/if}
})
</script>
{/block}